// pages/member/orderDetail.js
var base = require('../../conf.js')
Page({
  data: {
    detailList:{
      roomCost:"888",
      wine:"88",
      other:"55",
      send:"0",
      discount:"22",
      total:"88888"
    }
  },
  onLoad: function (options){
    var oid = options.oid;
    this.setData({
      oid:oid
    })
    this.getOrder()
  },
  getOrder:function(){
    var params = { "OrderId": this.data.oid }
    var self = this;
    wx.request({
      url: base.url + '/OrderDetail',
      method: 'get',
      data: { params: params},
      header: {
        "Content-Type": "application/json;charset=UTF-8",
        'userToken': base.token_Date
      },
      success: function (res) {
        console.log(res.data.data)
        var userlist = res.data.data
        self.setData({
          userlist: userlist
        })
      }
    })
  },
  toOrder: function () {
    wx.navigateTo({
      url: "/pages/home-page/order"
    })
  }
})